package com.example.esp8266;

public class LiteDao {

    private Params params;
    private String version;
    private long id;

    public static class Params{
        private int led;

        public int getLed() {
            return led;
        }

        public Params setLed(int led) {
            this.led = led;
            return this;
        }
    }

    public Params getParams() {
        return params;
    }

    public LiteDao setParams(Params params) {
        this.params = params;
        return this;
    }

    public String getVersion() {
        return version;
    }

    public LiteDao setVersion(String version) {
        this.version = version;
        return this;
    }

    public long getId() {
        return id;
    }

    public LiteDao setId(long id) {
        this.id = id;
        return this;
    }

    public static LiteDao enableLed(){
        return new LiteDao()
                .setId(System.currentTimeMillis())
                .setParams(new Params().setLed(1))
                .setVersion("1.0");
    }
    public static LiteDao disableLed(){
        return new LiteDao()
                .setId(System.currentTimeMillis())
                .setParams(new Params().setLed(0))
                .setVersion("1.0");
    }


}
